package com.example.homework01.controller;

import org.springframework.web.bind.annotation.*;

import java.util.Random;

@RestController
public class homewrok {

    @GetMapping("/random")
    public int one(){
        Random rd = new Random();

        return rd.nextInt(1000);
    }


    @GetMapping("/square/{getId}")
    public int afor(@PathVariable(value = "getId") int id){

        return id * id;
    }

}
